[<tag id="resourcepath" type="meta" value="/DesktopModules/NBright/NBrightBuy/App_LocalResources/"/>]

<!-- detail.html - The product details view template. It has 3 divs (images, purchasing, details) contained within 1 div (productdetail)  -->

[<tag id="includeinheader" type="meta" value="detailpageheader.html" />]<!-- Injects a template with dynamic data into page head section -->

<div class="productdetail" itemscope itemtype="http://schema.org/Product">

    @if (@Model.Info.GetXmlProperty("genxml/imgs/genxml[[1]]/hidden/imageurl") != "")
    {      
    <div class="images">
	<div class="image">

	<!-- Add to favorites buttons -->
    @if ("[Settings:enablefavorites]"=="True")
    {
	<a class="wishlistadd" listname="nbsfavorites0" itemid="[<tag type="valueof" databind="ItemId" />]">[<tag type="htmlof" resourcekey="ProductView.wishlistaddicon-lg" />]</a>
  	<a class="wishlistremove" listname="nbsfavorites0" itemid="[<tag type="valueof" databind="ItemId" />]" style="display:none;">[<tag type="htmlof" resourcekey="ProductView.wishlistremoveicon-lg" />]</a>        
    }

  <a href="[<tag type='valueof' xpath='genxml/imgs/genxml[[1]]/hidden/imageurl' />]" data-imagelightbox="nbb"><img src="[<tag type='thumbnail' w='{Settings:classicimagewidth}' h='{Settings:classicimageheight}' image='1' />]" alt="[<tag type='productimgdesc' index='1'  />]" title="[<tag type='productimgdesc' index='1'  />]" /></a>

    @if (@Model.IsOnSale)
    {
		<div class="onsaleflag">[<tag type="label" resourcekey="ProductView.onsaleflag" />]</div>
    }
    @if (!@Model.IsInStock)
    {
		<div class="outofstockflag">[<tag type="label" resourcekey="ProductView.outofstockflag" />]</div>
    }
  </div>
  
  [<tag type="xslinject" template="detailimages.xsl" argslist="classicgallerywidth,classicgalleryheight"/>]

</div>
    }

<div class="purchasing">

		<h1 itemprop="name">[<tag type="productname" />]</h1>

		<div class="price">

	@if (@Model.IsOnSale)
    {
        <span>[<tag type="valueof" resourcekey="ProductView.onsale" />] : </span>
		if (@Model.Models.Count >= 1 && @Model.Options.Count >= 1)
		{
			<span>[<tag type="valueof" resourcekey="ProductView.from" />] </span>
		}
		<span class="old">[<tag type="price" />]</span>
		<span class="sale">[<tag type="bestprice" />]</span>
	}
	else
	{
		if (@Model.Models.Count >= 1 && @Model.Options.Count >= 1) // has models or options
		{
			<span>[<tag type="valueof" resourcekey="ProductView.from" />] </span>
		}
		<span>[<tag type="price" />]</span>
	}

    </div>

	@if (@Model.Info.GetXmlProperty("genxml/lang/genxml/textbox/txtsummary") != "")
    {
		<div itemprop="description" class="summary">[<tag type="breakof" xpath="genxml/lang/genxml/textbox/txtsummary" />]</div>
	}
		@if (@Model.Models.Count >= 2) 
		{
			<div class="models">
			[<tag type="modelsradio" template="{name} ({bestprice})" RepeatDirection="Vertical" RepeatColumns="1" SelectedIndex="" cssclass="modelsradio" />]
			</div>
		}
		
		@if (@Model.Options.Count >= 1) 
		{
			<div class="options">
			<div class="option option1"><span class="optionname optionname1">[<tag type="productoptionname" index="1" />]</span><span class="optionvalue optionvalue1">[<tag type="productoption" index="1" />]</span></div>
			@if (@Model.Options.Count >= 2) 
			{
				<div class="option option2"><span class="optionname optionname2">[<tag type="productoptionname" index="2" />]</span><span class="optionvalue optionvalue2">[<tag type="productoption" index="2" />]</span></div>
			}
			@if (@Model.Options.Count >= 3) 
			{
				<div class="option option3"><span class="optionname optionname3">[<tag type="productoptionname" index="3" />]</span><span class="optionvalue optionvalue3">[<tag type="productoption" index="3" />]</span></div>
			}
			@if (@Model.Options.Count >= 4) 
			{
				<div class="option option4"><span class="optionname optionname4">[<tag type="productoptionname" index="4" />]</span><span class="optionvalue optionvalue4">[<tag type="productoption" index="4" />]</span></div>
			}
			@if (@Model.Options.Count >= 5) 
			{
				<div class="option option5"><span class="optionname optionname5">[<tag type="productoptionname" index="5" />]</span><span class="optionvalue optionvalue5">[<tag type="productoption" index="5" />]</span></div>
			}
			</div>
		}
	
	    @if ("[Settings:cataloguemode]"!="True")
		{
			<div class="buy">

		    @if (@Model.IsInStock)
			{
				<div class="quantityoptions">
				  <a class="qtyminus" href="javascript:void(0)">-</a>
				  [<tag type="addqty" text="1" width="21" cssclass="quantity" />]
				  <a class="qtyplus" href="javascript:void(0)">+</a>
				</div>
				[<tag type="linkbutton" resourcekey="ProductView.addtobasket" cssclass="classicbutton" commandname="addtobasket" commandargument="ItemID" />]
			}
			else
			{
				<span class="outofstock">[<tag type="label" resourcekey="ProductView.outofstock" />]</span>			
			}

			<span class="return">[<tag type="returnlink" resourcekey="ProductView.return" cssclass="classicbutton" />]</span>

			</div>
		}

</div>

<!-- Details -->
<div class="details">

        <ul class="nav-tabs">
			@if (@Model.Info.GetXmlProperty("genxml/lang/genxml/edt/description") != "")
			{
				<li class="tab-active"><a href="#tab-1">[<tag type="valueof" resourcekey="ProductView.description" />]</a></li><!-- Product description -->
			}			
			@if (@Model.Models.Count >= 1 && @Model.Options.Count >= 1) // has models or options
			{
				<li><a href="#tab-2">[<tag type="valueof" resourcekey="ProductView.models" />]</a></li><!-- Show Options table -->
			}
			@if (@Model.Docs.Count >= 1)
			{
				<li><a href="#tab-3">[<tag type="valueof" resourcekey="ProductView.documentation" />]</a></li><!-- Document downloads -->
			}
        </ul>
        <!--<div class="sharingwidget"><div class="share">[<tag type="valueof" resourcekey="ProductView.share" />] :</div><div class="addthis_sharing_toolbox"></div></div> Sharing widget -->
        <div class="sharingwidget"><div class="share">[<tag type="valueof" resourcekey="ProductView.share" />] :</div><div class="addthis_fake"><img src="/DesktopModules/NBright/NBrightBuy/Themes/Classic/img/addthis.png" /></div></div><!-- Only for Demo Website -->

		@if (@Model.Info.GetXmlProperty("genxml/lang/genxml/edt/description") != "")
		{
			<div id="tab-1" class="tab-content tab-active">
			  <h3>[<tag type="valueof" resourcekey="ProductView.description" />]</h3>
			  [<tag type="description" />]
			</div>
		}
		@if (@Model.Models.Count >= 1 && @Model.Options.Count >= 1) // has models or options
		{
			<div id="tab-2" class="tab-content tab-hide">
			  <h3>[<tag type="valueof" resourcekey="ProductView.models" />]</h3>
			  <div class="models">
			  <table>
					<tbody>
					  [<tag type="modelslist" template="modellist.html" />]
					</tbody>
				  </table>
			  </div>
			</div>
		}
		@if (@Model.Docs.Count >= 1)
		{
        <div id="tab-3" class="tab-content tab-hide">
        <h3>[<tag type="valueof" resourcekey="ProductView.documentation" />]</h3>
            <ul class="documents">
				@if (@Model.Info.GetXmlProperty("genxml/docs/genxml[[1]]/textbox/txtfilename") != "")
				{
					<li><i class='fa fa-file-text fa-2x'></i>[<tag type="label" resourcekey="ProductView.filebullets" />]<span class="documentname">[<tag type="productdoctitle" index="1" />]</span><span class="documentdescription">[<tag type="productdocdesc" index="1" />]</span>
					[<tag cssclass="documentlink classicbutton" resourcekey="ProductView.download" type="productdoclink" index="1" />]
					</li>
				}

				@if (@Model.Info.GetXmlProperty("genxml/docs/genxml[[2]]/textbox/txtfilename") != "")
				{
					<li><i class='fa fa-file-text fa-2x'></i>[<tag type="label" resourcekey="ProductView.filebullets" />]<span class="documentname">[<tag type="productdoctitle" index="2" />]</span><span class="documentdescription">[<tag type="productdocdesc" index="2" />]</span>
					[<tag cssclass="documentlink classicbutton" resourcekey="ProductView.download" type="productdoclink" index="2" />]
					</li>
				}

				@if (@Model.Info.GetXmlProperty("genxml/docs/genxml[[3]]/textbox/txtfilename") != "")
				{
					<li><i class='fa fa-file-text fa-2x'></i>[<tag type="label" resourcekey="ProductView.filebullets" />]<span class="documentname">[<tag type="productdoctitle" index="3" />]</span><span class="documentdescription">[<tag type="productdocdesc" index="3" />]</span>
					[<tag cssclass="documentlink classicbutton" resourcekey="ProductView.download" type="productdoclink" index="3" />]
					</li>
				}
            </ul>
        </div>
		}

</div>
<!-- End Details -->

<!-- Related Items -->
@if (@Model.GetRelatedProducts().Count >= 1)
{
	<h3>[<tag type="valueof" resourcekey="ProductView.related" />]</h3>
	<div id="relatedwrapper" class="productlist">
	[<tag type="relatedproducts" template="relatedlist.html" />]
	</div>
}

</div>

